package com.tansun.easycare.rule.ruleversion.dao;

import java.util.List;
import java.util.Map;

import com.tansun.easycare.core.persistence.CrudDao;
import com.tansun.easycare.rule.ruleversion.entity.RuleVersioninfo;

/**
 * 版本信息DAO接口
 *
 * @author lxs
 * @version 2017-02-28
 */

public interface RuleVersioninfoDao extends CrudDao<RuleVersioninfo> {


    List<RuleVersioninfo> findVersionList(Map<String, Object> map);

    /**
     * 查找已发布规则项目
     */
    List<RuleVersioninfo> findPublishRuleList(String projectCode);

    /**
     * 查找已发布规则项目
     */
    List<RuleVersioninfo> findPublishVersionList(RuleVersioninfo info);
    
    
    List<RuleVersioninfo> findNewPublishVersionList(RuleVersioninfo info);
    /**
	  * 查找当前版本的规则
	  * @return
	  */
	 public  List<RuleVersioninfo> findCurrVerList(RuleVersioninfo  info);
	 	/**
	     * 查找挑战者信息
	     */
	List<RuleVersioninfo> findChallengerInfo(Map<String, Object> map);
	
	/**
	 * 查找引用版本
	 * @param map
	 * @return
	 */
	List<RuleVersioninfo>  findRuleRefeVersion(Map<String,Object> map);
	
	
	List<String>   findRuleRefeCodes(Map<String,String> map);

    void updateIsValid(RuleVersioninfo ruleVersioninfo);
    
    
    List<RuleVersioninfo> findProjectRefeVersion(Map<String,String> map);

    
    void deleteByMutilVersion(Map<String,Object> map);

}